<!--
 * @Description: 动画
 * @Author: charles
 * @Date: 2021-08-17 09:28:34
 * @LastEditors: charles
 * @LastEditTime: 2021-08-17 09:55:30
-->
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>动画</title>
  <style>
    .box {
      width: 100px;
      height: 100px;
      background-color: lightblue;
      border-radius: 50%;
    }
    .move {
       /* 2. 设定动画 */
       /* animation-name: move;
       animation-duration: 2s;
       animation-timing-function: linear;
       animation-fill-mode:forwards;   
       animation-iteration-count: 2; 
       animation-direction: alternate-reverse;    */

       animation:move 2s 1s linear 2 forwards;
    }
    .move:hover {
      animation-play-state: paused;
    }
    .move_delay_1 {
      animation-delay: 1s;
    }

    /* 1. 定义动画帧 */
    @keyframes move{
      from {
        margin-left:0;
      }
      to {
        margin-left: 800px;
      }
    }
  </style>
</head>
<body>
  
  <div class="box move"></div>
  <!-- <div class="box move move_delay_1"></div> -->











</body>
</html>
